home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / amos / AMOSList-0499.lzh / AMOSLIST / 000122_nobody_Fri Apr 16 01:19:46 1999.msg < prev    next >
Internet Message Format  |  1999-05-01  |  4KB

  1. Received: from onelist.com (pop.onelist.com [209.207.164.205])
  2.     by osf1.gmu.edu (8.8.8/8.8.8) with SMTP id BAA20047
  3.     for <mcox4@osf1.gmu.edu>; Fri, 16 Apr 1999 01:19:41 -0400 (EDT)
  4. Received: (qmail 23952 invoked by alias); 16 Apr 1999 04:42:30 -0000
  5. Received: (qmail 23933 invoked from network); 16 Apr 1999 04:42:29 -0000
  6. Received: from unknown (HELO mago.agonet.it) (195.32.124.10) by pop.onelist.com with SMTP; 16 Apr 1999 04:42:29 -0000
  7. Received: from agonet.it (ghizzo@p126070.agonet.it [195.32.126.70]) by mago.agonet.it (8.8.5/8.8.5) with SMTP id HAA24769 for <amos-list@onelist.com>; Fri, 16 Apr 1999 07:19:21 +0200
  8. From: Pietro Ghizzoni <ghizzo@agonet.it>
  9. To: amos-list@onelist.com
  10. Date: Fri, 16 Apr 1999 07:05:52 +0200
  11. Message-ID: <yam7775.2622.1748273288@mail.agonet.it>
  12. In-Reply-To: <yam7773.203.135991264@mail1.tinet.ie>
  13. X-Mailer: YAM 2.0Preview7 [020] - Amiga Mailer by Marcel Beck - http://www.yam.ch
  14. Organization: Dairymen Soft
  15. Mailing-List: list amos-list@onelist.com; contact amos-list-owner@onelist.com
  16. Delivered-To: mailing list amos-list@onelist.com
  17. Precedence: bulk
  18. List-Unsubscribe: <mailto:amos-list-unsubscribe@ONElist.com>
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-Type: text/plain; charset=iso-8859-1
  22. Content-transfer-encoding: 8bit
  23. Subject: [amos-list] Re: Formatting String/Integer Gadgets in GUI Extension.
  24. Status: O
  25. X-Status: 
  26.  
  27. From: Pietro Ghizzoni <ghizzo@agonet.it>
  28.  
  29. Hello Declan
  30.  
  31. On 15-Apr-99, Declan Gorman wrote: [amos-list] Re: Formatting String/Integer Gadgets in GUI Extension.
  32.  
  33.  
  34. >> Why it doesn't works ??????
  35. > I was hoping you could tell me. :)
  36.  
  37. Hehe :) Oooppsss... it doesn't works :() because the integer gadget use the
  38. same justify method, and so the number is always shifted to the left. No
  39. problem.... see below...
  40.  
  41. > When the Integer gadget is selected in the gui it calls the following
  42. > code Where G=Gui Wait
  43. > If G=37
  44. > _STEP_SEQ_VELOCITY_1(_SEQUENCE)=Gui Code
  45. >  If _STEP_SEQ_VELOCITY_1(_SEQUENCE)>127
  46. >   Gui Beep
  47. >   _STEP_SEQ_VELOCITY_1(_SEQUENCE)=127
  48. >  End If
  49. > Gui Set 1,37,0,_STEP_SEQ_VELOCITY_1(_SEQUENCE)
  50. > End if
  51.  
  52. Oh my God! :) The IF STEPSEQ blah blah >127 control must be removed, and
  53. Gui Range used instead.
  54.  
  55. The only way to justify again correctly the gadget is this:
  56.  
  57. Gui Set 1,37,0,0 : Gui Set 1,37,0,STEPSEQ_VELOCITY_1(_SEQUENCE)
  58.  
  59.  
  60. But do you have this kind of IF code for every integer gadget of your GUI?? If
  61. so, you can reduce everthings to only few lines of code:
  62.  
  63. Example: i suppose your window is the window number 1....
  64.  
  65.  
  66. G=Gui Wait : GC=Gui Code : WIN=Gui Window
  67.  
  68.  
  69. If WIN=1
  70.  
  71.  
  72.  If G>=0 : Rem Check if the user has clicked a gadget and...
  73.  
  74.   If Gui Kind(WIN,G)=3 : Rem .....checks if the gadget is a INTEGER gadget...
  75.  
  76.       STEPSEQ_VELOCITY_1(_SEQUENCE)=GC : Gui Set WIN,G,0,0 : Gui Set WIN,G,0,GC
  77.  
  78.   EndIf
  79.  
  80.  
  81. EndIf
  82.  
  83.  
  84. This simple IF handle *ALL* the integer gadgets of your GUI, independently
  85. on wich GUI they are. The 127 limit is automatically applied by a previous
  86. call to Gui Range. 
  87.  
  88. Dinamic code... the secret of good programming.
  89.  
  90.  
  91. -- 
  92.  
  93.  
  94. Bye!
  95.  
  96.  
  97.                                      !!!
  98.                                      o o
  99.    +-----------------------------oOO-(_)-OOo----------------------------+
  100.    |                                                                    |
  101.    |  Pietro Ghizzoni - Dairymen Soft              __  /// Amiga 12OO   |
  102.    |     E-Mail:  ghizzo@agonet.it                 \\\/// 'O3O  5OMhz   |
  103.    |           ICQ 16361472                         \/// 18MB - CD4x    |
  104.    |                                                                    |
  105.    | Amos Development Group Coordinator                 AMIGA RULEZ!    |
  106.    |                                                                    |
  107.    +--------------------------------------------------------------------+
  108.  
  109.  
  110. ------------------------------------------------------------------------
  111. Start a new hobby. Meet a new friend.
  112. http://www.ONElist.com
  113. ONElist:  The leading provider of free e-mail list services!
  114. ------------------------------------------------------------------------
  115. Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html